/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package cn.webrx;

import java.util.Arrays;
import java.util.stream.Stream;

/**
 * <p>Project: jse2303 - Stream3</p>
 * <p>Powered by webrx On 2023-07-25 15:39:08</p>
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Stream7 {
    public static void main(String[] args) {
        Integer[] arr = new Integer[]{
                1, 10, 5
        };

        //Arrays 转换 Stream<Integer>
        Stream<Integer> stream = Arrays.stream(arr);

        //Stream<Integer> 转换 IntStream
        System.out.println(stream.mapToInt(Integer::intValue).max().getAsInt());


        //Stream 转换为 Array
        //stream.toArray();

        //List<Integer> list = stream.toList();

        //Stream<Integer> is33 = list.parallelStream();


    }
}
